Skip to content

Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD#1387

Merged
bors merged 3 commits into
rust-lang:masterfrom
tormol:fionclex
Jun 11, 2019
Merged

Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD#1387
bors merged 3 commits into
rust-lang:masterfrom
tormol:fionclex

Conversation

@tormol

@tormol tormol commented Jun 3, 2019

Copy link
Copy Markdown
Contributor

OpenBSD header | DragonFly header | Linux search
For Linux I've used godbolt compiler explorer to get final values where possible.

Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither.
I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a branch with how far I got.

@rust-highfive

Copy link
Copy Markdown

r? @gnzlbg

(rust_highfive has picked a reviewer for you, use r? to override)

@bors

bors commented Jun 4, 2019

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #1389) made this pull request unmergeable. Please resolve the merge conflicts.

@gnzlbg

gnzlbg commented Jun 7, 2019

Copy link
Copy Markdown
Contributor

Needs rebasing.

tormol added 3 commits June 7, 2019 20:00
* Change the type of FIONCLEX on apple platforms from c_uint to c_ulong
* Add FIONCLEX, FIONREAD, FIOASYNC, FIOSETOWN and FIOGETOWN
  for DragonFly and OpenBSD
@tormol

tormol commented Jun 7, 2019

Copy link
Copy Markdown
Contributor Author

Done.

@gnzlbg

gnzlbg commented Jun 8, 2019

Copy link
Copy Markdown
Contributor

@tormol three targets are failing, the failures look real.

@tormol

tormol commented Jun 8, 2019

Copy link
Copy Markdown
Contributor Author

Yes, I didn't check back yesterday, but I've started fixing them.

@tormol

tormol commented Jun 8, 2019

Copy link
Copy Markdown
Contributor Author

I've dropped the FIOQSIZE commit due to #1391 and the mistake making me doubt the values for the architectures that aren't tested.

I feel more certain about FIONCLEX as the value is similar to FIOCLEX.

@tormol

tormol commented Jun 11, 2019

Copy link
Copy Markdown
Contributor Author

Github didn't really show it, but I peeled off / removed the commit that added FIOQSIZE, and CI is now green.

@gnzlbg

gnzlbg commented Jun 11, 2019

Copy link
Copy Markdown
Contributor

@bors: r+

@bors

bors commented Jun 11, 2019

Copy link
Copy Markdown
Contributor

📌 Commit 2c10c4c has been approved by gnzlbg

@bors

bors commented Jun 11, 2019

Copy link
Copy Markdown
Contributor

⌛ Testing commit 2c10c4c with merge e0ff1e6...

bors added a commit that referenced this pull request Jun 11, 2019
Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD

[OpenBSD header](https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/filio.h?annotate=1.5) | [DragonFly header](http://gitweb.dragonflybsd.org/dragonfly.git/blame/refs/heads/master:/sys/sys/filio.h) | [Linux search](https://github.com/torvalds/linux/search?q=FIONCLEX+FIOQSIZE&unscoped_q=FIONCLEX+FIOQSIZE&type=Code)
For Linux I've used [godbolt compiler explorer](https://godbolt.org/z/h-C7qM) to get final values where possible.

Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither.
I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a [branch with how far I got](https://github.com/tormol/rust-libc/tree/sigio).
@bors

bors commented Jun 11, 2019

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing e0ff1e6 to master...

@bors bors merged commit 2c10c4c into rust-lang:master Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants